All Functions of Week 5

levels

{base}

Get levels of a factor

desc

{dplyr}

Arrange in descending order

arrange

{dplyr}

Sort values of data frame according to a variable/combination of varaibles

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

ifelse

{base}

Return a or b depending on the value of test

summarise

{dplyr}

collapse the dataset to a summary statistic. Usually used with group_by()

setwd

{base}

Set Working Directory

cut

{base}

Convert Numeric to Factor

read_excel

{readxl}

Read an Excel file

View

{base}

View a data frame

recode

{dplyr}

Recode a variable

select

{dplyr}

Select columns from a tibble/data frame

slice

{dplyr}

Subset rows using their positions

install.packages

{base}

Install R package

factor

{base}

Create a factor

library

{base}

Load an R package

ungroup

{dplyr}

Resolve grouping created with “group_by”

mutate

{dplyr}

Modify/create a column in a data frame

str

{utils}

Get the structure of an R object

filter

{dplyr}

Filter out rows of a data frame according to logical vector

head

{utils}

Show first 5 rows of a data frame

mean

{base}

Get mean of a vector

c

{base}

Combine values/vectors into a vector

names

{base}

Retrieve names of a list/vector

The end!